package per.com.service.ServiceImpl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import per.com.bean.Trip;
import per.com.dao.PcTripDao;
import per.com.service.PcTripService;

import java.util.List;

/**
 * @Author: plx
 * @Date: 2019/5/26 14:09
 * @Version 1.0
 */
@Service("PcTripServiceId")
public class PcTripServiceImpl implements PcTripService {
    @Autowired
    @Qualifier("PcTripDaoId")
    private PcTripDao pcTripDao;
    @Override
    public void addPassengers(Trip trip) {
        pcTripDao.addPassengers(trip);
    }

    @Override
    public List<Trip> getMyTrip(String userId) {
        return pcTripDao.getMyTrip(userId);
    }

    @Override
    public int orderCount(String orderId) {
        return pcTripDao.orderCount(orderId);
    }

    @Override
    public void exitTrip(String passengers,String orderId) {
        pcTripDao.exitTrip(passengers,orderId);
    }
}
